﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;


namespace SqlSugarCoreDemo.DBSqlSugar
{
    /// <summary>
    /// 路由表
    /// </summary>
    [SugarTable("SysRoute", TableDescription = "路由表")]
    public partial class SysRoute
    {
        /// <summary>
        /// 路由ID
        /// </summary>
        [Display(Name = "路由ID")]
        [SugarColumn(ColumnDescription = "路由ID", IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 权限别名（值为api_url转换生成）
        /// </summary>
        [Display(Name = "权限别名")]
        [SugarColumn(ColumnDescription = "权限别名", IsNullable = true)]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string authority { get; set; }
        /// <summary>
        /// 菜单类型：1 总后台（枚举MenuType）
        /// </summary>
        [Display(Name = "菜单类型")]
        [SugarColumn(ColumnDescription = "菜单类型")]
        public byte menuType { get; set; }
        /// <summary>
        /// 路由类型：1 页面，2 API
        /// </summary>
        [Display(Name = "路由类型")]
        [SugarColumn(ColumnDescription = "路由类型")]
        public byte routeType { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Display(Name = "标题")]
        [SugarColumn(ColumnDescription = "标题")]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string title { get; set; }
        /// <summary>
        /// 页面路由地址（页面类型时才有值）
        /// </summary>
        [Display(Name = "页面路由地址")]
        [SugarColumn(ColumnDescription = "页面路由地址", IsNullable = true)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string routeUrl { get; set; }
        /// <summary>
        /// 视图路径：shared/table、shared/table_img、shared/table_edit (页面类型才填写）
        /// </summary>
        [Display(Name = "视图路径")]
        [SugarColumn(ColumnDescription = "视图路径", IsNullable = true)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string viewsPath { get; set; }
        /// <summary>
        /// API数据读取/提交地址
        /// </summary>
        [Display(Name = "API数据读取/提交地址")]
        [SugarColumn(ColumnDescription = "API数据读取/提交地址", IsNullable = true)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string apiUrl { get; set; }
        /// <summary>
        /// 所属父路由ID
        /// </summary>
        [Display(Name = "所属父路由ID")]
        [SugarColumn(ColumnDescription = "所属父路由ID")]
        public int parentId { get; set; }
        /// <summary>
        /// 路由ID列表(逗号分隔开)
        /// </summary>
        [Display(Name = "路由ID列表")]
        [SugarColumn(ColumnDescription = "路由ID列表")]
        public string classList { get; set; }
        /// <summary>
        /// 路由深度
        /// </summary>
        [Display(Name = "路由深度")]
        [SugarColumn(ColumnDescription = "路由深度")]
        public int classLayer { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        [Display(Name = "添加时间")]
        [SugarColumn(ColumnDescription = "添加时间")]
        public DateTime? addTime { get; set; }
    }
}
